package com.lvyq.myplayer.model.collect
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.lvyq.myplayer.dao.PlayCollectDao
/**
 * 文件描述：PlayHistoryViewModel
 * 作者：lvyq
 * 创建时间：2025-06-16
 * 修改时间：2025-06-16
 */

class PlayCollectViewModelFactory(private val collectDao: PlayCollectDao) : ViewModelProvider.Factory {
    override fun <T : ViewModel> create(modelClass: Class<T>): T {
        if (modelClass.isAssignableFrom(PlayCollectViewModel::class.java)) {
            return PlayCollectViewModel(collectDao) as T
        }
        throw IllegalArgumentException("Unknown ViewModel class")
    }
}